import { rcaNumberFormat0 } from './common.js'
import { dateFormat } from '@/util/date'
import { commonTableOption } from './common.js'
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  ...commonTableOption,
  height: '400px',
  column: [
    {
      hide: true,
      search: true,
      type: 'date',
      label: '日期范围',
      prop: 'tradeDate',
      searchSpan: 12,
      searchRange: true,
      searchValue: [],
      format: 'yyyy-MM-dd',                  // 这是组件展示的日期格式
      valueFormat: 'yyyy-MM-dd',
    },
    {
      hide: true,
      search: true,
      type: 'select',
      label: '运营商',
      props: {
        label: 'operatorsName',
        value: 'operators'
      },
      dicUrl: '/rca/swckclearrules/listoperators',
      prop: 'operators'
    },
    {
      hide: true,
      search: true,
      type: 'select',
      label: '线路',
      prop: 'lineCode',
      dicQuery: { allLine: true },
      dicUrl: '/support/swparamline/dictsecondname',
      props: {
        label: 'name',
        value: 'code'
      },
    },
    {
      type: 'input',
      width:'150px',
      label: '运营商',
      prop: 'operatorsName'
    },
    {
      type: 'input',
      width:'150px',
      label: '线路',
      prop: 'lineName',
    },
    {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '单程票',
      prop: 'receivableOnewayAccSum'
    }, {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '长安通',
      prop: 'catSystemClean'
    }, {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '交通卡',
      prop: 'trafficCardSystemClean'
    }, {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '二维码',
      prop: 'qrTicketSystemClean'
    }, {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '人脸',
      prop: 'faceTicketSystemClean'
    }, {
      label: '其他车票',
      children: [
        {
          type: 'input',
          width:'150px',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '计次票',
          prop: 'countingTicket'
        }, {
          type: 'input',
          width:'150px',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '日票',
          prop: 'dailyTicket'
        }, {
          type: 'input',
          width:'150px',
          showSummary: true,
          precision: 7,
          formatter: (row, value, label, column) => {
            return rcaNumberFormat0(value)
          },
          label: '纪念票',
          prop: 'commemorativeTicket'
        },
      ]
    }, {
      type: 'input',
      width:'150px',
      showSummary: true,
      precision: 7,
      formatter: (row, value, label, column) => {
        return rcaNumberFormat0(value)
      },
      label: '收入小计',
      prop: 'incomeSubtotal'
    }]
}
